package com.jdyinfo.ic.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import okhttp3.OkHttpClient;

@Configuration
public class OkHttpConfig {
	@Bean(name="okHttpClient")
	public OkHttpClient okHttpClient() {
		long connectTimeout = 30;
		long readTimeout = 20;
		long writeTimeout = 10;
		
		OkHttpClient okHttpClient = OkHttpClientBuilder.build(connectTimeout, readTimeout, writeTimeout);
		return okHttpClient;
	}
}
